package ar.edu.unq.wannaplay.utils;

import java.util.ArrayList;
import java.util.List;

import ar.edu.unq.wannaplay.calendareable.Calendareable;

public class DayInfo extends Info {
    private int day;

    private List<Calendareable> info = new ArrayList<Calendareable>();

    private CalendareableState state;

    public int getDay() {
        return day;
    }

    public void setDay(final int day) {
        this.day = day;
    }

    public List<Calendareable> getInfo() {
        return info;
    }

    public void setInfo(final List<Calendareable> info) {
        this.info = info;
    }

    @Override
    public Info cloneInfo() {
        return new DayInfo();
    }

    @Override
    public void addElem(final Object information, final CalendareableState status) {
        info.add((Calendareable) information);
        state = status;
    }

    @Override
    public void removeElem(final Object information) {
        info.remove(information);
    }

    @Override
    public String toString() {
        return (day < 10 ? "0" + day : day) + "-" + info.size() + " ";
    }

    public CalendareableState getState() {
        return state;
    }

    public void setState(final CalendareableState state) {
        this.state = state;
    }

}
